﻿@model IEnumerable<DataAccess.Datatypes.Good>

@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_SiteGoodLayout.cshtml"; 
}

<div style="width: 100%; float:left; position:relative; top: 60px; margin-left: 60px;  margin-bottom: 60px;"> 
    <h2 class="blue-font-title" style="margin-left: 0;">My Stuff</h2>
    <table>
        <tr>
            <th>
                @Html.DisplayName("Name")
            </th>
            <th>
                @Html.DisplayName("Price")
            </th>
            <th>
                @Html.DisplayName("Likes")
            </th>
            <th></th>
        </tr>

    @foreach (var item in Model) {
        <tr>
            <td>
                @Html.DisplayFor(modelItem => item.Name)
            </td >
            <td>
                @Html.DisplayFor(modelItem => item.PriceDay)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Likes)
            </td>
            <td>
                <b>@Html.ActionLink("Edit", "Edit", (string)ViewBag.Name, new { id=item.Id }, null)</b>
                <b>@Html.ActionLink("View", "View", (string)ViewBag.Name, new { id=item.Id }, null)</b>                
            </td>
        </tr>
    }

    </table>
    <div style="margin-top:20px">
        <p class="blue-font not-transform-text">
            @Html.ActionLink("Add a New Good", "NewGood", (string)ViewBag.Name)
        </p>
    </div>
</div>